<template>
    <div class="supervisors-list">
        <div class="poup-box">
            <div class="close" @click="store.changeshowProcess"></div>
            <div class="title setColor">办件信息</div>
            <div class="xiaiaobox">
                <img class="xiabiao" src="../../../assets/namexiabiao.png" alt="">
            </div>
            <div class="check-box">
                <div class="left">
                    <!-- 等级 -->
                    <el-select v-model="value1" class="m-2" placeholder="等级">
                        <el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                     <!-- 预警等级 -->
                     <el-select v-model="value2" class="m-2" placeholder="预警等级">
                        <el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                    <!-- 噪音类型 -->
                    <el-select v-model="value3" class="m-2" placeholder="噪音类型">
                        <el-option v-for="item in options3" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                    <!-- 噪音位置 -->
                    <input type="text" class="input" placeholder="请输入噪音位置" />
                    <!-- 选择时间 -->
                    <div class="m-3">
                        <el-date-picker
                            v-model="valueTime"
                            type="datetimerange"
                            start-placeholder="开始时间"
                            end-placeholder="结束时间"
                            format="YYYY-MM-DD HH:mm:ss"
                            date-format="YYYY/MM/DD ddd"
                            time-format="A hh:mm:ss"
                        />
                    </div>
                    <!-- 处置状态 -->
                    <el-select v-model="value4" class="m-2" placeholder="处置状态">
                        <el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                </div>
                <div class="right">
                    <!-- 搜索 -->
                    <button class="setColor1"></button>
                    <!-- 重置 -->
                    <button class="setColor2"></button>
                </div>
            </div>
            <div class="titlebox">
                <div class="item" v-for="(item, index) in titleList" :key="index">{{ item }}</div>
            </div>
            <div class="conlist">
                <div class="item" v-for="(item, index) in list" :key="index">
                    <div class="text">
                        <div class="a" :class="item.status==1?'color1':item.status==2?'color2':item.status==3?'color3':''">{{ item.name }}</div>
                    </div>
                    <div class="text" :class="item.status==1?'textcolor1':item.status==2?'textcolor2':item.status==3?'textcolor3':''">{{ item.seName }}</div>
                    <div class="text">{{ item.yijian }}</div>
                    <div class="text">{{ item.state }}</div>
                    <div class="text">{{ item.operation }}</div>
                    <div class="text">{{ item.state1 }}</div>
                    <div class="text">{{ item.operation1 }}</div>
                </div>
            </div>
            <div class="superpagenumber">
                <span class="span">共{{ total }}条数据</span>
                <el-pagination class="my-page" v-model:page-size="pageSize3" :background="background"
                    layout="prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
                    @current-change="handleCurrentChange" />
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

let titleList = ref(['等级', '预警等级', '噪声类型', '噪声位置', '发生时间', '处置单位', '处置状态'])
let list = ref([
    { name: '低', seName: '初次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:1 },
    { name: '低', seName: '初次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:1 },
    { name: '中', seName: '二次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:2 },
    { name: '中', seName: '二次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:2 },
    { name: '高', seName: '多次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:3 },
    { name: '高', seName: '多次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:3 },
    { name: '高', seName: '多次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:3 },
    { name: '高', seName: '多次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:3 },
    { name: '高', seName: '多次', yijian: '建筑施工噪声', state: '夔州东路奉节县医院', operation: '2024.06.08 16:08', state1: '县住房城乡建委', operation1: '处置中', status:3 },
])
const pageSize3 = ref(10)
const background = ref(true)
let total = ref(600)
const handleSizeChange = (val: any) => {
    console.log(`${val} items per page`)
}
const handleCurrentChange = (val: any) => {
    console.log(`current page: ${val}`)
}

import { useCounterStore } from '@/stores/fengjiepoups'
const store = useCounterStore()


const value1 = ref('')
const value2 = ref('')
const value3 = ref('')
const value4 = ref('')
const options1 = [
  {
    value: '高',
    label: '高',
  },
  {
    value: '中',
    label: '中',
  },
  {
    value: '低',
    label: '低',
  }
]
const options2 = [
  {
    value: '多次',
    label: '多次',
  },
  {
    value: '二次',
    label: '二次',
  },
  {
    value: '初次',
    label: '初次',
  }
]
const options3 = [
  {
    value: '工业噪声',
    label: '工业噪声',
  },
  {
    value: '建筑施工噪声',
    label: '建筑施工噪声',
  },
  {
    value: '交通运输噪声',
    label: '交通运输噪声',
  },
  {
    value: '社会生活噪声',
    label: '社会生活噪声',
  },
  {
    value: '其他特殊类型噪声',
    label: '其他特殊类型噪声',
  }
]
const options4 = [
  {
    value: '处置中',
    label: '处置中',
  },
  {
    value: '已办结',
    label: '已办结',
  }
]
const valueTime = ref('')


</script>

<style lang="less" scoped>
.supervisors-list {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .7);
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;

    .poup-box {
        width: 1407px;
        height: 860px;
        background-image: url("../../../assets/poupbg.png");
        background-size: 100% 100%;
        position: relative;
        box-sizing: border-box;
        padding: 0 48px;

        .close {
            width: 32px;
            height: 32px;
            background-image: url("../../../assets/icon_flowpages_close.png");
            background-size: 100% 100%;
            position: absolute;
            right: 50px;
            top: 56px;
            cursor: pointer;
        }

        .title {
            width: 100%;
            margin-top: 64px;
            text-align: center;
            font-family: AlimamaShuHeiTi-Bold;
            font-weight: 700;
            font-size: 32px;
        }

        .xiaiaobox {
            width: 100%;
            display: flex;
            justify-content: center;
            margin-top: 10px;

            .xiabiao {
                width: 234px;
                height: 2px;
            }
        }

        .check-box {
            width: 100%;
            margin-top: 30px;

            .left {
                width: 100%;
                display: flex;
                align-items: center;
                .m-2{
                    width: 164px;
                    margin-right: 12px;
                }
                .input {
                    width: 164px;
                    height: 32px;
                    border: none;
                    margin: 0;
                    background: none;
                    background-image: url("../../../assets/poup-check-bg.png");
                    background-size: 100% 100%;
                    box-sizing: border-box;
                    padding: 0 8px;
                    font-size: 14px;
                    margin-right: 16px;
                    color: white;
                }
                .input::placeholder{
                    color: dashed black;
                }

                .sexbox {
                    width: 164px;
                    height: 32px;
                    border: none;
                    margin: 0;
                    background: none;
                    background-image: url("../../../assets/poup-check-bg.png");
                    background-size: 100% 100%;
                    box-sizing: border-box;
                    padding: 0 8px;
                    font-size: 14px;
                    margin-right: 16px;
                }
            }

            .right {
                width: 100%;
                display: flex;
                align-items: center;
                margin-top: 16px;
                .setColor1 {
                    width: 86px;
                    height: 32px;
                    border: none;
                    background: none;
                    background-image: url("../../../assets/searchbtn.png");
                    background-size: 100% 100%;
                    cursor: pointer;
                }

                .setColor2 {
                    width: 86px;
                    height: 32px;
                    border: none;
                    background: none;
                    background-image: url("../../../assets/resbtn.png");
                    background-size: 100% 100%;
                    cursor: pointer;
                    margin-left: 12px;
                }
            }
        }

        .titlebox {
            width: 100%;
            height: 38px;
            background: rgba(0, 88, 255, 0.5);
            margin-top: 16px;
            display: flex;
            align-items: center;
            box-sizing: border-box;
            padding: 0 21px;

            .item {
                width: calc(100% / 7);
                font-size: 14px;
                color: rgba(255, 255, 255, 0.85);
            }
        }

        .conlist {
            width: 100%;
            height: 430px;

            .item {
                width: 100%;
                margin-top: 16px;
                height: 32px;
                background-image: url("../../../assets/bg_text.png");
                background-size: 100% 100%;
                display: flex;
                align-items: center;
                box-sizing: border-box;
                padding: 0 21px;

                .text {
                    width: calc(100% / 7);
                    font-size: 14px;
                    color: #FFFFFF;
                    .a{
                        width: 24px;
                        height: 20px;
                        line-height: 20px;
                        text-align: center;
                        border-radius: 2px;
                        font-weight: 400;
                        font-size: 12px;
                    }
                }
                .textcolor1{
                    color: rgba(38, 157, 107, 1) !important;
                }
                .textcolor2{
                    color: rgba(255, 201, 122, 1) !important;
                }
                .textcolor3{
                    color: rgba(255, 56, 56, 1) !important;
                }
                .color1{
                    background: rgba(38, 157, 107, .2);
                    color: rgba(38, 157, 107, 1);
                }
                .color2{
                    background: rgba(255, 201, 122, .2);
                    color: rgba(255, 201, 122, 1);
                }
                .color3{
                    background: rgba(255, 56, 56, .2);
                    color: rgba(255, 56, 56, 1);
                }
            }
        }

        .superpagenumber {
            width: 100%;
            display: flex;
            justify-content: center;
            margin-top: 20px;

            .span {
                color: #ffffffd9;
                font-size: 14px;
                line-height: 40px;
                margin-right: 20px;
            }

            .my-page :deep(.el-pagination__jump) {
                color: white;
                /* 修改跳转输入框文字颜色 */
            }
        }
    }
}
.m-2 :deep(.el-select__wrapper) {
    border: none;
    background: none;
    background-image: url("../../../assets/poup-check-bg.png");
    background-size: 100% 100%;
}
.m-3{
    margin-right: 16px;
}
.m-3 :deep(.el-input__wrapper) {
    border: none;
    background: none;
    background-image: url("../../../assets/poup-check-bg.png");
    background-size: 100% 100%;
}
</style>